package com.alone.openai.api.core.param;

import lombok.Data;

/**
 * @author Alone
 * @date 2023/3/23 4:12 下午
 */
@Data
public class EditParam {

    /**
     * ID of the model to use. You can use the text-davinci-edit-001 or code-davinci-edit-001 model with this endpoint.
     * <p>
     * 要使用的模型的ID。您可以在此端点中使用text-davinci-edit-001或code-davinci-edit-001模型。
     */
    private String model;

    /**
     * The input text to use as a starting point for the edit.
     * <p>
     * 用作编辑起点的输入文本。
     */
    private String input;

    /**
     * The instruction that tells the model how to edit the prompt.
     * <p>
     * 告诉模型如何编辑提示的指令。
     */
    private String instruction;

    /**
     * How many completions to generate for each prompt.
     * <p>
     * Note: Because this parameter generates many completions, it can quickly consume your token quota.
     * Use carefully and ensure that you have reasonable settings for max_tokens and stop.
     * <p>
     * 每个提示要生成多少个完成。
     * <p>
     * 注意: 由于此参数会生成许多完成，因此可以快速消耗您的令牌配额。仔细使用，并确保您对max_token和stop有合理的设置。
     */
    private int n = 1;

    /**
     * What sampling temperature to use, between 0 and 2.
     * Higher values like 0.8 will make the output more random,
     * while lower values like 0.2 will make it more focused and deterministic.
     * <p>
     * We generally recommend altering this or top_p but not both.
     * <p>
     * 使用什么采样温度，在0到2之间。
     * 较高的值 (如0.8) 将使输出更具随机性，而较低的值 (如0.2) 将使其更加集中和确定性。
     * <p>
     * 我们通常建议更改此或top_p，但不能同时更改。
     */
    private float temperature = 1;

    /**
     * An alternative to sampling with temperature, called nucleus sampling,
     * where the model considers the results of the tokens with top_p probability mass.
     * So 0.1 means only the tokens comprising the top 10% probability mass are considered.
     * <p>
     * We generally recommend altering this or temperature but not both.
     * <p>
     * 用温度采样的一种替代方法，称为核采样，其中模型考虑具有top_p概率质量的令牌的结果。
     * 因此，0.1意味着仅考虑包括顶部10% 概率质量的标记。
     * <p>
     * 我们通常建议更改此温度或温度，但不要同时更改。
     */
    private float top_p = 1;


}
